package com.ctshk.rpc.cms.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

/**
 * 旅行团首页目录三级分类DTO
 *
 * @author lys
 * @create 2021-06-16
 */

@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(value = "GroupTypeDTO", description = "PC首页分类类型对象")
public class HomeGroupTypeDTO implements Serializable, Comparable<HomeGroupTypeDTO> {

    @ApiModelProperty(value = "分类id")
    private String id;

    @ApiModelProperty(value = "分类名称")
    private String name;

    @Override
    public int compareTo(HomeGroupTypeDTO o) {
        return Integer.valueOf(this.getId().substring(1)).compareTo(Integer.valueOf(o.getId().substring(1)));
    }
}